<?php
/**
 * Smarty plugin
 * @package Smarty
 * @subpackage Commercial core plugins
 */


/**
 * Smarty email_format modifier plugin
 *
 * Type:     modifier<br>
 * Name:     email_format<br>
 * Date:     Oct 20, 2008
 * Purpose:  unified formatting for emails
 * Input:    string
 * Example:  {$item.email|email_format}
 *           {'mailto:abc@ya.ru'|email_format}
 * @author   Alex Yaroshevich <qfox@ya.ru>
 * @version 0.1
 * @param string with email
 * @return string
 */
function smarty_modifier_email_format( $email )
{
	return sprintf( '<a href="mailto:%1$s">%1$s</a>', strtolower( $email ) );
}

?>